home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 1996 April / Software of the Month Club 1996 April.iso / pc / os2 / httpacc / readme.130 < prev    next >
Text File  |  1996-02-21  |  15KB  |  374 lines

  1. HTTPAcc Version 1.30 November, 1995
  2.  
  3. AB Software
  4. 3109 Village Rd West
  5. Norwood, MA 02062-2542
  6. USA
  7.  
  8. awysocki@bearsoft.com
  9. Current files can always be found at:
  10.  
  11. http://www.bearsoft.com/abs/httpacc.html
  12. -----------------------------------------------------------------------------
  13. NOTE: This version uses objects from VisPro C development environment.  This
  14. is not a problem.  But I do have to say the following:
  15.  
  16. You can freely distribute any executable created with VisPro/C to anyone
  17. without restrictions or royalties.  You can distribute the ad-on objects DLLs
  18. freely provided you do wo with a license prohibiting the recipient from copying
  19. (except for backup purposes) an/or transferring the dynamic link libraries.
  20.  
  21.  
  22. SO: You can only copy the .DLL files for backup purposes!
  23. -----------------------------------------------------------------------------
  24.  
  25. If you like this program and use it day to day please register by
  26. sending $20.00 in US Dollars to AB Software at the above address
  27.  
  28.  
  29. This is the quick and dirty setup doc for HTTPAcc
  30.  
  31. This program will allow you to reset the OS2HTTPD ACCESS.LOG file
  32. each night.  Remember that the LOG will be RESET EACH night.  The
  33. only catch is how many LOG files do you want hanging around.
  34.  
  35. Currently the unique host list is trashed at each reset.  I have no need
  36. to write these hosts out to any file.  If you need this list then let me
  37. know and I will add something in.
  38.  
  39. The first step is the install and setup.
  40.  
  41. ----------------------------------------------------------------------------
  42. INSTALL:
  43.  
  44.   Put the program in the d:\OS2HTTPD\BIN directory, along with the .DLL's.
  45. This should be the standard place to put the file.
  46.  
  47.  
  48. ----------------------------------------------------------------------------
  49. Command Line Parameters
  50.  
  51. -b#             - Turn ON or OFF batch mode (# = 0 or 1)
  52. -a#             - Turn ON or OFF AutoScroll mode (#= 0 or 1)
  53. -d---           - Set the mode for Daily Access to be saved (---= YES or NO)
  54. -h####          - Set the number of minutes between running the UPDATE REXX command
  55.                   can be between 0 and 1441
  56. -u#             - Turn ON or OFF Update mode (#= 0 or 1)
  57. -l#             - Turn ON or OFF List Update mode (#= 0 or 1)
  58. xxxxxxxx        - The name of the ACCESS.LOG file to process
  59.  
  60. Here is an example .CMD file to process old .ACC files.  This example went and processed
  61. my old .ACC files to give me monthly stats.
  62. --------------------------------------
  63.  
  64. FOR %%f in (*.acc) do httpacc %%f -b -a0 -d0 -h1441 -l0 -u0
  65.  
  66.  
  67.  
  68. ----------------------------------------------------------------------------
  69. HTTPACC.INI values
  70. You will then need to edit and customize the HTTPACC.INI file (Windows ASCII file)
  71. The keywords you can specify are:
  72.  
  73. [HTTPAccess]
  74.   Debug=
  75.   Test=
  76.   StartUpTime=
  77.   WaitTime=
  78.   PauseTime=
  79.   HTMLStats=
  80.   AccessLog=
  81.   DailyACC=
  82.   AutoReset=
  83.   ManualReset=
  84.   AutoScroll=
  85.   MaxLines=
  86.   BatchMode=
  87.   SaveYearlyStats=
  88.   DisplayUpdate=
  89.   UpdateList=
  90.  
  91. [HTTPAccessREXX]
  92.   MaxPages=
  93.   MaxHosts=
  94.   PastDays=
  95.   HTMLUpdateCMD=
  96.   HTMLFinalCMD=
  97.   haTitle=
  98.   haUpdateGIF=
  99.   haFinalGIF=
  100.   haWeeklyGIF=
  101.   haURLUpdateGIF=
  102.   haURLFinalGIF=
  103.   haURLWeeklyGIF=
  104.   haUpdateHTML=
  105.   haFinalHTML=
  106.   haWeeklyHTML=
  107.  
  108. -----------------------------------------------------------------------------
  109. The following INI entries fall UNDER the heading of [HTTPAccess]
  110.  
  111. Debug= Set to ON or OFF to log additional information to the HTTPACC.DBG
  112. file. The default is OFF
  113.  
  114. Test= Set to ON or OFF to allow you to run the FINAL REXX.CMD file before the
  115. end of day.  Setting to ON will unhide a button on the screen. The default is OFF
  116.  
  117. StartUpTime= The number of miliseconds to wait before the program starts
  118. processing the ACCESS.LOG file.  This is useful incase the server crashes,
  119. you may want to let other processes start before his process starts.
  120. The default is set to 60000 (1 Minute)
  121.  
  122. WaitTime= The number of miliseconds to wait before checking the log again.
  123. This timeout will be used when there are no new lines in the ACCESS.LOG.
  124. You want to try to get this number big.  If its too small then the process
  125. will eat up lots of the CPU cycles.  The default if not specified is 5000
  126. (5 seconds)
  127.  
  128. PauseTime= The number of miliseconds to wait between read with data.
  129. If the process finds a new line in the log it will process the line, it will
  130. then wait this PauseTime between reading the next line.  The default if not
  131. specified is 100 (.1 second)
  132.  
  133. HTMLStats= The number of MINUTES between running the REXX chart.cmd program
  134. For an active server increase this!  The default is set to 0 OFF
  135.  
  136. AccessLog= This is the full path and file name of the access log.  There
  137. is NO DEFAULT so this *MUST* be specified.  You should use something like,
  138. d:\os2httpd\logs\access.log
  139.  
  140. DailyACC= You can shut off the copy of the ACCESS.LOG file to .ACC file
  141. The default is YES
  142.  
  143. AutoReset= Set to Yes or No.  If set to YES then at the change of the day
  144. the ACCESS.LOG file will be reset.  The default is Yes.
  145.  
  146. ManualReset= I put this in mainly for testing, but if you want you can reset
  147. the log anytime you want.  Just set this variable to On or Off and the
  148. 'Reset Log' button will be turned On/Off.  When the button is pressed the
  149. Log will be reset and the stats will be written to the HTTPACC.LOG file.
  150. The default is Off.
  151.  
  152. AutoScroll= This will allow defaults of the AutoScroll Check box.  If you
  153. want scrolling on then set this to On/Yes.  The default is On
  154.  
  155. MaxLines= This is the number of ACCESS.LOG lines to keep on the screen in the
  156. scroll box.  The default is 200.  I have mine set at 5000.
  157.  
  158. BatchMode= Set to ON or OFF to allow the program to run the final REXX command
  159. and terminate without operator intervention.  Use this to process old or previous
  160. days ACCESS.LOG files.  There is also a command line parameter to override this option.
  161. The default is OFF
  162.  
  163. SaveYearlyStats= Set to YES or NO to allow HTTPAcc to keep daily summaries which can
  164. be used to show past history.  Summary information is passed to the REXX final routine.
  165. The default is YES
  166.  
  167. DisplayUpdate= Set to ON or OFF.  This will allow the program to run a little quicker if
  168. you don't need to see updates every log entry.  This should only be set to OFF when running
  169. in Batch mode.  The default is ON
  170.  
  171. UpdateList= Set to ON or OFF.  This will allow the program to shut off entries into the
  172. scroll list on the screen.  If you are running with limited memory, this can save the
  173. machine from keeping a copy of the last 'MaxLines' from the ACCESS.LOG file in memory.
  174. The default is ON.
  175.  
  176. ------
  177. The following INI entries fall UNDER the heading of [HTTPAccessREXX]
  178.  
  179. MaxPages= The maximum number of pages to export to the REXX program
  180. The default is 25
  181.  
  182. MaxHosts= The maximum number of top hosts to export to the REXX program
  183. The default is 25
  184.  
  185. PastDays= The number of past days to show when creating the GIF file for stats. This
  186. information is passed to the REXX FINAL program to process.
  187. The default is 24
  188.  
  189. HTMLUpdateCMD= The name of the REXX command to call when the HTMLStats
  190. timer pops.  This will be called everytime the stats timer expires
  191. There is no default.  If left blank then no update rexx program will be called.
  192.  
  193. HTMLFinalCMD= The name of the REXX command to call then the END-OF-DAY
  194. expires (flips).  This can be the same or different from the UPDATE Rexx
  195. program.  There is no default.
  196.  
  197. 7DayStats= The name of the file to keep 7 days worth of data.  The
  198. default is 'SEVEN.DAT'
  199.  
  200.         These variables are not use just exported to the REXX programs
  201. haTitle= Title of the GRAPH
  202.  
  203. haUpdateGIF= The name of the Update GIF file
  204. haFinalGIF= The name of the FINAL stats for the day GIF file
  205. haWeeklyGIF= The name of the last # of days GIF file
  206. haURLUpdateGIF= The name of the Update GIF file for the HTML
  207. haURLFinalGIF= The name of the FINAL stats for the day GIF file for the HTML
  208. haURLWeeklyGIF= The name of the last # of days stats for the GIF file for the HTML
  209.  
  210. haUpdateHTML= The name of the HTML file for updates
  211. haFinalHTML= The name of the HTML file for the final stats
  212. haWeeklyHTML= The name of the HTML file for the weekly stats (currently not used)
  213.  
  214. ----------------------------------------------------------------------------
  215. Daily .ACC file
  216.   This is a copy of the ACCESS.LOG file, any records that are processed
  217. are put in this file.  Its a Daily copy of the ACCESS.LOG file, only records
  218. for that day are placed in this file.  This can be turned off if you don't
  219. want to keep the daily log files, you would do this by setting DailyACC=OFF
  220. in the .INI file
  221.  
  222.  
  223. yymmmdd.ACC
  224. yy  = Two digit year
  225. mmm = Alpha month (Jan, Feb, Mar, Apr...)
  226. dd  = Two digit month
  227.  
  228.  
  229. ----------------------------------------------------------------------------
  230. HTTPACC.LOG
  231.  
  232. The httpacc.log file is a log file that is used to write the stats out for
  233. the day.  Currently the information included is:
  234.  
  235. mm/dd/yy hh:mm:ss:### , mm/dd/yyyy, # , #, #, #, #, #, #, #
  236.  
  237. Where its the Date, Time then followed by
  238. The date of the data - NOTE this can vary if you only process your log once
  239.                         a week
  240. HTML Requests
  241. NonHTML Requests
  242. Script Requests
  243. Malformed Requests
  244. Total Number of bytes sent.
  245. Total number of unique hosts
  246. Total number of minutes of processing
  247. Total number of unique documents processed
  248.  
  249.  
  250. ---------------------------------------------------------------------------
  251. REXX Variables
  252.  
  253. When the REXX program that is called to process the stats the following
  254. variables are available to be used.  Note the REXX programs are called
  255. by HTTPAcc depending on the time specified by HTMLStat= variable in the
  256. .INI file.  You do not need to call the rexx program, httpacc will.  And
  257. when the programs are called the following variables will be set in the
  258. REXX variable pool.  So you can just reference them from your rexx
  259. program.
  260.  
  261.   haRequests.           - STEM variable of hourly requests 1-24
  262.   haMaxRequests         - Highest request number per hour
  263.   haMaxRequestsIndex    - Which hour had the highest requests
  264.   haUnique.             - STEM variable of hourly unique hosts 1-24
  265.   haMaxUnique           - Hightest unique host count per hour
  266.   haMaxUniqueIndex      - Which hour had the hightest count of unique hosts
  267.  
  268.   haTotalMinutes        - Total minutes running
  269.   haHour                - Total Hours Running in hh:mm format
  270.   haMinute              - Total minutes running in hh:mm format
  271.   haStartHour           - Start hour
  272.   haStartMin            - Start minute
  273.   haMon                 - Month (Jan, Feb...)
  274.   haDay                 - Day 1, 2, 3, ...
  275.   haYear                - Year 1995, ...
  276.   haDOW                 - Day of the Week
  277.   haJulian              - Julian Date
  278.   haJulianYear          - Julian Date for the year 1-366
  279.  
  280.   haTopHostsCnt         - The number of hosts in the list  This will never
  281.                            be greater than MaxPages as set in the .INI file
  282.   haTopHosts.Str.       - STEM variable with list of top hosts
  283.   haTopHosts.Cnt.       - STEM variable with list of top hosts - counts
  284.  
  285.   haTopPagesCnt         - The number of pages in the list
  286.   haTopPages.Str.       - STEM variable of top page hits
  287.   haTopPages.Cnt.       - STEM variable of top page hits - counts
  288.  
  289.   haHTMLReq             - Total number of HTML request
  290.   haNonHTMLReq          - Total number of NON HTML requests
  291.   haScriptReq           - Total number of CGI/Script requests
  292.   haMalformedReq        - Total number of malformed requests
  293.   haTotalBytes          - Total number of bytes sent
  294.  
  295.   haYearStats.0         - the same as PastDays in the .INI file
  296.   haYearStats.TotalHosts. - Total number of unique hosts for that day
  297.   haYearStats.TotalDocs.  - Total number of unique documents for that day
  298.   haYearStats.TotalReqs.  - Total number of requests for that day
  299.   haYearStats.TotalMinutes.  - Total number of minutes of process time for that day
  300.   haYearStats.TotalBytes. - Total number of bytes sent for that day
  301.   haYearStats.Mon.        - Month for that date
  302.   haYearStats.Day.        - Days for the date
  303.   haYearStats.Year.       - Year for the Date
  304.  
  305.                 These variables are defined from the .INI file
  306.   haTitle               - Title
  307.   haFinalGIF            - FinalGIF
  308.   haUpdateGIF           - UpdateGIF
  309.   haURLFinalGIF         - FinalGIF
  310.   haURLUpdateGIF        - UpdateGIF
  311.   haFinalHTML           - FinalHTML
  312.   haUpdateHTML          - UpdateHTML
  313.  
  314.  
  315. ---------------------------------------------------------------------------
  316. REXX functions
  317. HTTPAccLoadINI -
  318.   Read in an INI file and set the same REXX variable
  319. There are three ways to call the function, with 1 to 3 parameters.
  320.  
  321.  rc = HTTPAccLoadIni('ANDY')
  322.         - Will load Variable ANDY from under [HTTPAccessREXX] Section
  323.           in the HTTPAcc.INI file.  The REXX variable will be called ANDY
  324.  
  325.  
  326.  rc = HTTPAccLoadIni('ANDY', '[TEST]')
  327.         - Will load Variable ANDY from under [TEST] Section
  328.           in the HTTPAcc.INI file
  329.  
  330.  
  331.  rc = HTTPAccLoadIni('ANDY', '[TEST]', 'C:\OS2HTTPD\BIN\ANDY.INI')
  332.         - Will load Variable ANDY from under [TEST] Section
  333.           in the ANDY.INI file
  334.  
  335.  
  336. ---------------------------------------------------------------------------
  337. Version 1.30 - Fixes (Nov 1995)
  338.   - Added in Day of the Week code 'haDOW'
  339.   - added support for BATCH Processing
  340.   - added support for command line parms to override .INI file
  341.   - Store yearly stats by hour/day/year in 'HA19xx.STA' file
  342.   - Allow for Read of INI from from REXX
  343.   - New last 24 day stats
  344.   - Updated Chart to include Unique documents/hour
  345.   - Updated Charts to include last 24 days of of processing
  346.  
  347.  
  348. Version 1.21 - Fixes (Nov 1995)
  349.   - Added in the code to support DailyACC .INI variable
  350.   - Added Time stamp for Status Line
  351.  
  352. Version 1.20 - Changes (Oct 1995)
  353.   - Added in HTML graphs (.GIF)
  354.   - New output options for Weekly & Monthly stats
  355.   - Added top ### list of documents and hosts
  356.   - Removed auto HTML report of stats,  moved to a REXX function.
  357.     so you can customize the output to what you want!!
  358.  
  359. Version 1.10 - Changes
  360.   - Removed KeepLogs= variable from INI file, now all output logs will be
  361.     created using yymmmdd.ACC where yy=year, mmm=Jan, Feb..., and dd=Day 01..
  362.   - Added in Charting of accesses per hour
  363.   - Added in support for HTML stats output
  364.   - Added in support for unique hosts counts
  365.   - reformatted screen
  366.  
  367. Version 1.11 - Changes
  368.   - Fixed bug in calculations of Hourly and Minute requests on the STATS.HTML
  369.     page
  370.  
  371. -------------------
  372. --- end of file ---
  373. -------------------
  374.